import React, { useState } from 'react';
import { Col,Input,Button } from 'antd';

export const Search = (props) => {

    // 输入消费项目
    const [consumeitems,setconsumeitems] = useState('') 
  
    const suremethod = () => {
      console.log(consumeitems);
      if(consumeitems=="餐饮"){
        // setplaystate(true);
      }
    }
  
  return (
   <>
         <Col span={8}>
             <Input.Group compact>
                <Input
                   style={{
                     width: '200px',
                     height:'50px'
                    }}
                    placeholder="输入消费项目"
                    value={consumeitems} onChange={e => setconsumeitems(e.target.value)}
                  />
                  <Button type="primary"  
                     onClick={suremethod}
                     style={{
                         width: '70px',
                         height:'50px',
                         backgroundColor:'rgb(204,204,204)',
                         border:'1px solid #fff',
                         color:'rgba(0, 0, 0, 0.85)'
                       }}>确定
                   </Button>
               </Input.Group>
           </Col>
   </>
  );
  }